<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>访问统计的访问量</title>
</head>
<body>

<br/>
<a href="hello-servlet">Hello Servlet</a>

<%
    long number=0;
    if (application.getAttribute("n")!=null){
        number=(Long)application.getAttribute("n");
    };
    number++;
    application.setAttribute("n",number);
    out.print("<h1>系统当前访问数："+number+ "</h1>");
%>
<h1> 系统当前访问的次数 </h1><%=number%>
</body>
</html>